<template>
  <view class="container">
    <!-- 顶部组件 -->
    <u-navbar
      :is-back="true"
      :background="{ background: '#fff' }"
      border-bottom
      id="nav-bar"
      title="活动规则"
    ></u-navbar>
    <rich-text class="richBox" :nodes="agreement"></rich-text>
  </view>
</template>
<script>
import service from '@/common/service.js';
export default {
  data() {
    return {
      agreement: '',
    };
  },
  onLoad(e) {
    this.getAgreement();
  },
  methods: {
    getAgreement(type) {
      const that = this;
      service.getGxsyGuiZe(
        {},
        function (res) {
          if (res && res.status === 1) {
            const { data } = res;
            that.agreement = data;
          }
        },
        function () {}
      );
    },
  },
};
</script>

<style lang="scss">
page {
  background-color: #fff;
}

.container {
  width: 100%;
  min-height: 100vh;
  padding: 0 30rpx 60rpx;
  text-align: left;
  background-color: #fff;
}

.richBox {
  width: 100%;
}
</style>
